package com.chang.MethodValidation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUser {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(ValidationConfig.class);
        ValidationService service = context.getBean(ValidationService.class);
        User user = new User();
        user.setName("小花");
        user.setPhone("18153535465");
        user.setAge(77);
        user.setMessage(" 1"); // 注入空格内容
        System.out.println(service.testMethod(user));

    }
}
